package com.cy.pj.sys.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysRoleMenuDao {
	//基于id删除角色和菜单关系数据
	@Delete(" delete from sys_role_menus  where menu_id=#{menuId}")
	int deleteObjectsByMenuId(Integer menuId);
	
	/**
	 * 
	 * @param roleId
	 * @return
	 */
	@Delete(" delete from sys_role_menus where role_id=#{Id}")
	int deleteObjectsByRoleId(Integer Id);
	
	int insertObjects(
			@Param("roleId")Integer roleId,
			@Param("menuIds")Integer[]menuIds);

	
}
